<template>
	<view class="cttit">
		<text>常见问题</text>
		<view class=""></view>
	</view>
	<view class="listbg" v-if="list.length">
		<view class="listitem" @click="goinfo(index)" v-for="(item,index) in list" :key="index">
			<view class="q">
				<text>{{item.title}}</text>
			</view>
			<image src="@/static/arright.png" mode=""></image>
		</view>
	</view>
	<view class="" style="padding-top: 120rpx;" v-else>
			  
			<up-empty
			        mode="message"
					text="暂无记录"
			>
			</up-empty>
		
	</view>
	
</template>

<script setup>
	
	import {
		ref,
		onMounted
	} from 'vue';
	import {
		articleArticleList
	} from "@/api/index.js"
	

	onMounted(() => {
		getList()
	})
	let list = ref([])
	


	function goinfo(e){
		let info=list.value[e]
		uni.setStorageSync('helpInfo',info)
		uni.navigateTo({
			url:"./info"
		})
			
	}	

	function getList(){
	
	
	      let data={
	      	pageSize:99,
	      	pageNum:1,
			type:6
	      }
			articleArticleList(data).then(res=>{
					  list.value=res.rows

			})
			 
		}

	
</script>




<style lang="scss">
	
	.cttit {
		margin-top: 36rpx;
		margin-left: 30rpx;
		position: relative;
		display: flex;
		flex-direction: column;
	
		&>text {
			font-family: PingFang-SC, PingFang-SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #111111;
			line-height: 24rpx;
			position: relative;
			z-index: 10;
		}
	
		view {
			width: 130rpx;
			height: 16rpx;
			border-radius: 20rpx;
			background: #C7A46F;
			position: absolute;
			bottom: -6rpx;
		}
	}
	
	.listbg {

		width: 690rpx;
		height: auto;
	
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin-left: 30rpx;
		margin-top: 24rpx;
		overflow: hidden;

		.listitem {
			border-radius: 16rpx;
				background: #FFFFFF;
				box-sizing: border-box;
				padding: 0 30rpx;
			display: flex;
			align-items: center;
			margin-top: 24rpx;
			justify-content: space-between;
			border-bottom: 1rpx solid #F6F6F6;
			height: 90rpx;
			width: 100%;
	
            .q{
				display: flex;
		
				
				text {
					font-family: PingFang-SC, PingFang-SC;
					font-weight: 500;
					font-size: 30rpx;
					color: #000000;
				}
			}

			image {
				width: 14rpx;
				height: 25rpx;
			}
		}
	}

	page {
		background: #F6F6F6;
	}


</style>